Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use default messages from en as fallback if messages are missing in another locale #7054

Merged
merged 3 commits into from
Sep 21, 2024

Conversation

amannn
Copy link
Contributor

@amannn amannn commented Sep 18, 2024

Description

As discussed on X with @ovflowd.

Note the missing messages were legit errors, I wouldn't disable the error handling.

Also, truly global error handling in next-intl is currently unfortunately a bit cumbersome to set up, I'm waiting for better support on the Next.js side to improve this (see vercel/next.js#69294).

Validation

Before:

Screenshot 2024-09-18 at 15 04 38

After:

Screenshot 2024-09-18 at 15 17 48

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • [ ] I've covered new added functionality with unit tests if necessary.

@amannn amannn requested a review from a team as a code owner September 18, 2024 13:25
Copy link

vercel bot commented Sep 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Sep 19, 2024 7:32am

apps/site/i18n.tsx Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Sep 21, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 99 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 100 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 100 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 99 🟢 100 🟢 100 🟢 92 🔗

Copy link

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 92%
90.47% (589/651) 76.29% (177/232) 94.35% (117/124)

Unit Test Report

Tests Skipped Failures Errors Time
131 0 💤 0 ❌ 0 🔥 4.998s ⏱️

@bmuenzenmeyer bmuenzenmeyer added this pull request to the merge queue Sep 21, 2024
Merged via the queue into nodejs:main with commit 06400ad Sep 21, 2024
15 checks passed
joeeames pushed a commit to joeeames/nodejs.org that referenced this pull request Sep 24, 2024
…ng in another locale (nodejs#7054)

* fix: Use default messages from `en` as fallback if messages are missing in another locale

* chore: Remove `deepmerge` dependency in favor of a more optimized custom function

* chore: Revert changes to lockfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants